package com.atguigu.patterns.singleton;


public class SingletonSyncCodeBlock implements AbstractSingleton{
    private static SingletonSyncCodeBlock singleton;
    private SingletonSyncCodeBlock(){}
    public static SingletonSyncCodeBlock getInstance(){
        if(singleton == null){
            synchronized (SingletonSyncCodeBlock.class){
                singleton = new SingletonSyncCodeBlock();
            }
        }
        return singleton;
    }
}
